SlideShare a Scribd company logo
Summary of variables
Variables are used for storing and modifying data   Variables can store numbers and text  The main data types are:  int long float double boolean char
Examples of storing data:   int daysOfWeek = 7;  String employeeName = "John Smith";
Examples of modifying data: first_number = 20;  second_number = first_number + 35;  answer = first_number * second_number;
Rules:  Variable names can't start with a number.  Variable names can't be the same as Java keywords.  Variable names can't have spaces them.

More Related Content

PDF
Coursejspservlets00
PDF
Jeetrainers.com coursejspservlets00
PPT
Krazykoder variables
PPT
Krazykoder features intro_3
PPT
Krazykoder features intro_2
PPT
Krazykoder features intro_2
PPT
Krazykoder features intro
PPT
Krazykoder features intro
Coursejspservlets00
Jeetrainers.com coursejspservlets00
Krazykoder variables
Krazykoder features intro_3
Krazykoder features intro_2
Krazykoder features intro_2
Krazykoder features intro
Krazykoder features intro
Ad

Krazykoder variables

  • 2. Variables are used for storing and modifying data Variables can store numbers and text The main data types are: int long float double boolean char
  • 3. Examples of storing data: int daysOfWeek = 7; String employeeName = "John Smith";
  • 4. Examples of modifying data: first_number = 20; second_number = first_number + 35; answer = first_number * second_number;
  • 5. Rules: Variable names can't start with a number. Variable names can't be the same as Java keywords. Variable names can't have spaces them.